package com.goblin.model.base;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;

import lombok.Data;

import static javax.persistence.GenerationType.IDENTITY;

@Data
@Entity
@Table(name = "t_test_base_entity")
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public class BaseEntity implements Serializable {

	@Id
	@GeneratedValue
	@Column(name = "id", columnDefinition = " int(11) COMMENT 'id'")
	protected Integer id;

	@Column(name = "create_user", columnDefinition = " varchar(255) COMMENT '创建人姓名'")
	protected String createUser;

	@Column(name = "create_user_id", columnDefinition = " int(11) COMMENT '创建人id'")
	protected Integer createUserId;

	@Column(name = "create_time", columnDefinition = " datetime COMMENT '创建时间'")
	protected Date createTime;

	@Column(name = "update_user", columnDefinition = " varchar(6) COMMENT '修改人姓名'")
	protected String updateUser;

	@Column(name = "update_user_id", columnDefinition = " int(11) COMMENT '修改人id'")
	protected Integer updateUserId;

	@Column(name = "update_time", columnDefinition = " datetime COMMENT '修改时间'")
	protected Date updateTime;

	@Column(name = "delete_time", columnDefinition = " datetime COMMENT '删除时间'")
	protected Date deleteTime;

	@Column(name = "version_code", columnDefinition = " int(11) COMMENT '版本号'")
	protected Integer versionCode;

	@Column(name = "status", columnDefinition = " varchar(1) COMMENT '数据状态 0:正常 1：删除'")
	protected String status;
}
